
<template>
    <el-config-provider :locale="zhCn">
        <router-view></router-view>
    </el-config-provider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useUserStore } from './store';
import { provide } from 'vue';
// console.log(import.meta.env.VITE_API_BASE_URL)

const userStore = useUserStore()
const clearData = () => {
    userStore.setToken('')
    userStore.setUserInfo({        
        username: '',
        position: '',
        avatar: '',
        userId: 0,
        account: '',
    })
}

provide('clearData', clearData)
</script>

